import service from '@/services/service'
// 合同创建列表
export function getContractList(data) {
  return service.post('/contract-client-web/contractCreate/list', data)
}

//驳回
export function auditReject(data) {
  return service.post('/contract-client-web/contractCreate/auditReject', data)
}
//通过
export function auditPass(data) {
  return service.post('/contract-client-web/contractCreate/auditPass', data)
}

// 删除
export function deleteContract(data) {
  return service.post('/contract-client-web/contractCreate/delete', data)
}

// 合同查询列表
export function getContractQueryList(data) {
  return service.post('/contract-client-web/contractSearch/queryContractForm', data)
}

// 冻结合同
export function freezeContract(data) {
  return service.post('/contract-client-web/contract/freeze/updateContractFreezeState', data)
}

// 选择合同模板
export function getContractTemplateList(data) {
  // return http.request({
  //   url: `/contract-client-web/templateDefinition/templateListForForm`,
  //   data,
  //   method: 'post'
  // })
  return service.post('/contract-client-web/templateDefinition/templateListForForm', data)
}

// 作废合同
export function invalidContract(data) {
  return service.post('/contract-client-web/contractSearch/updateEffectiveFlag', data)
}
//合同新增模版校验
export function contractPreVerification(params) {
  return service.post('/contract-client-web/contractCreate/contractPreVerification', params)
}

//合同查询-合同历史版本列表
export function queryContractHistoricalVersion(params) {
  return service.post('/contract-client-web/contractSearch/queryContractHistoricalVersion', params)
}

